home *** CD-ROM | disk | FTP | other *** search
- Path: kuhub.cc.ukans.edu!moxu
- From: moxu@kuhub.cc.ukans.edu
- Newsgroups: comp.lang.c++
- Subject: Scan a file. Urgent!!!!!!
- Message-ID: <1996Feb11.120142.113766@kuhub.cc.ukans.edu>
- Date: 11 Feb 96 12:01:42 CST
- Organization: University of Kansas Academic Computing Services
-
- A data file has integers, a few characters. I want to read the content
- out and assign integer values in the file into an array. I use "fscanf". The
- things is when I use "fscanf(datafile,"%d",&digit)", the execution halted when
- a character was encounted, probably because this sentence returns "NULL". So, I
- can't read through the file and assign all the data into the array.
- Urgent! The project is due Wednesday and now I haven't even set up the array
- yet!
- Any hint will be highly appreciated!
- Thanks a lot!
-